package com.hksj.Intelligentmanagement.mqtt.command;

import lombok.Data;

import java.util.List;

@Data
public class DisConnMsgData extends BaseMsgData{
    public DisConnMsgData() {
        setCmd(CommandConstant.COMMAND_DIS_CONN);
    }

    private Integer devices_num;
    private List<ConnMsgData.DeviceInfo> devices;

    @Data
    public static class DeviceInfo{
        private String addr;
    }

    public ConnMsgData.DeviceInfo createDeviceInfo(String addr){
        ConnMsgData.DeviceInfo deviceInfo = new ConnMsgData.DeviceInfo();
        deviceInfo.setAddr(addr);
        return deviceInfo;
    }
}
